<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- Bootstrap CSS-->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/vendor/bootstrap/css/bootstrap.css">
    <!-- Font Awesome CSS-->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/vendor/font-awesome/css/font-awesome.min.css">
    <!-- Custom Font Icons CSS-->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/font.css">
    <!-- theme stylesheet-->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.default.css" id="theme-stylesheet">
    <!-- Custom stylesheet - for your changes-->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/custom.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/layer.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/bootstrap/css/bootstrap-switch.min.css">
    <title>查看用户</title>
</head>
<body>
<%@include file="header.jsp"%>

<div class="d-flex align-items-stretch">
    <!-- Sidebar Navigation-->
   <%@include file="nav.jsp"%>
    <!-- Sidebar Navigation end-->
    <div class="page-content">
        <div class="page-header">
            <div class="container-fluid">
                <h2 class="h5 no-margin-bottom">用户列表</h2>
            </div>
        </div>
        <section class="no-padding-bottom">
            <div class="title">
                <form class="form-inline">
                    <div class="form-group">
                        <label for="inlineFormInput" class="sr-only">Name</label>
                        <input id="inlineFormInput" type="text" placeholder="按名字查找" class="mr-sm-3 form-control" name="realName">
                    </div>
                    <div class="form-group">
                        <input type="submit" value="查询" class="btn btn-primary">
                    </div>
                </form>
            </div>
            <div class="table-responsive">
               <%@include file="userCenter.jsp"%>
            </div>
        </section>
        <%@include file="footer.jsp"%>
    </div>
</div>

<!-- JavaScript files-->
<%@include file="floor.jsp"%>
<script>
    $(".userDetail").click(function () {
        console.log("你点击了用户详情");
        window.location.href = '${pageContext.request.contextPath}/user/userDetail?name='
    });
    $("#focus").on("click",function () {
        if (this.checked===false){
            window.location.href = '#?focus=0'
        }else {
            window.location.href = '#?focus=1'
        }
    })
    $(".table-responsive").on("click",".checkbox-template",function () {
        var id=$(this).prop("id");
        $.ajax({url:"/user/addFocus",data:{"userId":${user.id},"id":id},success:function (rs) {
                $(".table-responsive").html(rs);
            }
        })
    })
</script>
</body>
</html>